package com.huahang.fashionpress.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * mybatisPlus配置分页插件
 * @Author: 阿俊哥
 * @Date: 2019/8/24 11:53
 * @Version 1.0
 */
@Configuration
@EnableTransactionManagement
@MapperScan("com.huahang.fashionpress.mapper")
public class MybatisPlusConfig {

    @Bean
    public PaginationInterceptor paginationInterceptor(){
        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
        paginationInterceptor.setLimit(20);
        return paginationInterceptor;
    }
}
